package com.hx.abstract1;

import com.hx.abstract1.impl.HuaweiFactory;
import com.hx.abstract1.impl.XiaomiFactory;

/**
 * @Author： Huathy
 * @ClassPath： com.hx.abstract1.Client
 * @Date： 2021-01-28 15:12
 * @Description： 测试类
 */
public class Client {
    public static void main(String[] args) {
        System.out.println("==========小米==========");
        XiaomiFactory xiaomiFactory = new XiaomiFactory();
        IPhoneProduct xmPhone = xiaomiFactory.iPhoneProduct();
        xmPhone.start();
        IRouterProduct xmRouter = xiaomiFactory.iRouterProduct();
        xmRouter.openWifi();

        System.out.println("==========华为==========");
        HuaweiFactory huaweiFactory = new HuaweiFactory();
        IPhoneProduct hwPhone = huaweiFactory.iPhoneProduct();
        hwPhone.start();
        IRouterProduct hwRouter = huaweiFactory.iRouterProduct();
        hwRouter.openWifi();
    }
}
